package com.suming.springboot_game.service.impl;

import com.suming.springboot_game.common.Result;
import com.suming.springboot_game.entity.Role;
import com.suming.springboot_game.mapper.RoleMapper;
import com.suming.springboot_game.service.RoleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class RoleServiceImpl implements RoleService {
    @Autowired
    private RoleMapper roleMapper;
    @Override
    public Integer recruit(Role role) {
        return roleMapper.recruit(role);
    }

    @Override
    public List<Role> selectAll() {
        return roleMapper.selectAll();
    }

    @Override
    public Integer dismiss(List<Integer> ids) {
        return roleMapper.dismiss(ids);
    }

    @Override
    public List<Role> selectPage(Integer pageNum, Integer pageSize, String name) {
        return roleMapper.selectPage(pageNum,pageSize,name);
    }

    @Override
    public Integer countByName(String name) {
        return roleMapper.countByName(name);
    }
}
